#ifndef SPOTLIGHTSOURCE_H
#define SPOTLIGHTSOURCE_H

#include "ilightsource.h"

class SpotLightSource : public ILightSource
{
public:
    SpotLightSource(const Point &source, const Point &lookAt, double angle, double atenuation_factor = 50.0);
    LightIntensity intensity(const Point &p) const;
    Vector direction(const Point &p) const;
    void glSetup(int light_id) const;
    void applyCameraTransformation(const Camera &camera);
    ILightSource* clone() const;

private:
    Point source_, lookAt_;
    Vector direction_;
    double angle_;
    double atenuation_factor_;
};

#endif // SPOTLIGHTSOURCE_H
